package com.example.demo.domain.model;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author X.I.O
 * @title: UserModel
 * @projectName springboot
 * @description: TODO
 * @date 2021/10/31 14:47
 *
 * user model 导出实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@HeadRowHeight(value = 15)  //设置表头高度
@ExcelIgnoreUnannotated     //忽略没有注解标记的属性
public class UserModel implements Serializable {

    /**
     * 用户账号
     */
    @ExcelProperty(value = "用户账号", index = 0)
    @ApiModelProperty("用户账号")
    private String username;

    /**
     * 用户密码
     */
    @ExcelProperty(value = "用户密码", index = 1)
    @ApiModelProperty("用户密码")
    private String password;

    /**
     * 用户姓名
     */
    @ExcelProperty(value = "用户姓名", index = 2)
    @ApiModelProperty("用户姓名")
    private String realname;

    /**
     * 用户手机号
     */
    @ExcelProperty(value = "用户手机号", index = 3)
    @ApiModelProperty("用户手机号")
    private String phone;

    /**
     * 数据状态(0，有效，1删除)
     */
    @ExcelProperty(value = "数据状态", index = 4)
    @ApiModelProperty("数据状态")
    private Integer status;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间", index = 5)
    @ApiModelProperty("创建时间")
    private Date createtime;
}
